Skip to content

Fix action-plugin-docs sanity for junos action plugins#830

Open
malikdotexe wants to merge 3 commits into
Juniper:masterfrom
malikdotexe:fix/junos-action-plugin-sanity
Open

Fix action-plugin-docs sanity for junos action plugins#830
malikdotexe wants to merge 3 commits into
Juniper:masterfrom
malikdotexe:fix/junos-action-plugin-sanity

Conversation

@malikdotexe

@malikdotexe malikdotexe commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • Rename juniper.device action plugins to junos_* names so each action matches its module (action-plugin-docs sanity).
  • Add plugin_routing.action redirects in juniper.device/meta/runtime.yml for short aliases (e.g. interfacesjunos_interfaces).
  • Add matching plugin_routing.action entries in junipernetworks.junos/meta/runtime.yml so playbooks using deprecated junipernetworks.junos.* FQCNs still resolve actions to the renamed plugins in juniper.device.
  • Add tests/sanity/ignore-2.21.txt for Ansible 2.21 (helper actions + pre-existing bad-return-value-key module doc issues).

Sanity test report (local, ansible-core 2.21)

Collection: ansible_collections/juniper/device
Command: ansible-test sanity (from collection root)

action-plugin-docs

Before (master) After (this PR)
ansible-test sanity --test action-plugin-docs (no ignore-2.21.txt) FAIL — 2 issues: extract_data.py, juniper_junos_common_action.py PASS with ignore-2.21.txt (same 2 helper ignores only)
Full path scan (all plugins/action/*.py vs modules) 30 name mismatches (e.g. interfaces.py vs junos_interfaces module, logging.py, helpers) 3 remaining (logging.py, extract_data.py, juniper_junos_common_action.py) — 27 resource-action mismatches fixed by rename

Note: On master, ansible-test only reported 2 failures because most short-name actions are symlinks (interfaces.pyjunos.py); the checker does not flag symlink names the same way as a full path scan. Renames fix the real naming mismatch regardless.

action-plugin-docs ignores: unchanged for ignore-2.16ignore-2.20 (still only the two helper actions). No ignores added or removed for renamed junos_* resource actions. No junos.py ignore — plugins/modules/junos.py exists.

Full sanity (ansible-test sanity, all 34 tests)

Before (master) After (this PR)
No ignore-2.21.txt FAIL — 6 tests (action-plugin-docs, validate-modules, …)
ignore-2.19 copied as ignore-2.21 only FAIL — 5 tests (validate-modules incl. 4× bad-return-value-key, import on py3.11–3.14)
ignore-2.21.txt in PR PASS (exit 0; warnings only: py3.10 compile/import not installed)

junipernetworks/junos (shim)

Test After (this PR)
yamllint, runtime-metadata PASS

Test plan

  • ansible-test sanity passes on ansible_collections/juniper/device (with ignore-2.21.txt)
  • ansible-test sanity --test yamllint --test runtime-metadata passes on ansible_collections/junipernetworks/junos
  • ansible-test sanity --test action-plugin-docs passes on juniper.device (ignores only for extract_data and juniper_junos_common_action)

@malikdotexe malikdotexe force-pushed the fix/junos-action-plugin-sanity branch 2 times, most recently from d31ad90 to 97f6f2d Compare June 20, 2026 08:45
Rename juniper.device action plugins to junos_* names matching their
modules, add plugin_routing.action redirects for short aliases, and mirror
action redirects in junipernetworks.junos runtime.yml so deprecated FQCNs
keep working. Add ignore-2.21.txt for Ansible 2.21 sanity.
Restructure RETURN docstrings in junos_banner, junos_system, junos_user,
and junos_vrf to use a properly nested dict for `diff.prepared` instead
of a dotted flat key. Remove the corresponding ignore-2.21.txt entries
since these modules (from the junipernetworks.junos merger) should not
carry sanity ignores.
@malikdotexe malikdotexe force-pushed the fix/junos-action-plugin-sanity branch from 97f6f2d to 921d5ec Compare June 20, 2026 08:45
@rohitthakur2590

Copy link
Copy Markdown
Collaborator

@dineshbaburam91 could you help us giving maintainers acces for @malikdotexe

Add plugin_routing.action and modules redirects for l2_interfaces and
lag_interfaces in juniper.device runtime.yml. Bump unit-source devel and
milestone matrix jobs to Python 3.13 for ansible-core devel compatibility.
@rohitthakur2590

Copy link
Copy Markdown
Collaborator

now that @malikdotexe have tested this locally, @chidanandpujar @dineshbaburam91 could you also prlease review this and also validate through integration tests at your end as well. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants